//
// Created by BaiXin on 2025/8/20.
//
# include "iostream"
# include "windows.h"

using namespace std;

int main() {
    SetConsoleOutputCP(CP_UTF8);

    int *pArr = new int[5]{1, 2, 3, 4, 5};
    int *pNewArr = new int[4];
    for (int i = 0; i < 5; i++) {
        if (i == 2) {
            continue;
        }
        if (i > 2) {
            pNewArr[i - 1] = pArr[i];
        }
        pNewArr[i] = pArr[i];
    }
    delete[] pArr;
    pArr = pNewArr;
    for (int i = 0; i < 4; i++) {
        cout << "新数组的元素：" << pArr[i] << endl;
    }
    return 0;
}
